#include "stdafx.h"
#include "globalFunc.h"

bool SortbyNumASC(const CString& x, const CString& y)
{
	int nLeft, nRight;
	CW2A temp1(x.Left(x.ReverseFind('.')));
	CW2A temp2(y.Left(y.ReverseFind('.')));
	nLeft = atoi(temp1.m_szBuffer);
	nRight = atoi(temp2.m_szBuffer);
	return nLeft < nRight;
}


long PointToRotated(SciPoint& beforeRotate, SciPoint* afterRotate, SciPoint& rotateCenter, double angle)
{

	afterRotate->x = cos(angle) * (beforeRotate.x - rotateCenter.x)
		- sin(angle) * (beforeRotate.y - rotateCenter.y) + rotateCenter.x;

	afterRotate->y = cos(angle) * (beforeRotate.y - rotateCenter.y)
		+ sin(angle) * (beforeRotate.x - rotateCenter.x) + rotateCenter.y;

	return 0;
}
